package we3d.material 
{
	import we3d.mesh.Face;
	
	public class FlatAttributes implements ISurfaceAttributes
	{
		public function FlatAttributes (fillColor:uint=0x804020, fillAlpha:Number=1) {
			color = fillColor;
			alpha = fillAlpha;
		}
		
		/** 
		* Fill color
		*/
		public function get color () :uint {
			return _color;
		}
		public function set color (v:uint) :void {
			_color = v;
			_color32 = int(_alpha*255) << 24 | _color;
		}
		/**
		* Alpha transparency from 0-1
		*/
		public function get alpha () :Number {
			return _alpha;
		}
		public function set alpha (v:Number) :void {
			_alpha = v;
			_color32 = int(_alpha*255) << 24 | _color;
		}
		/** 
		* @private
		*/
		public var _color:uint;
		/** 
		* @private
		*/
		public var _color32:uint;
		/** 
		* @private
		*/
		public var _alpha:Number;
		/** 
		* @private
		*/
		public function init () :void {}
		/** 
		* @private
		*/
		public function initFace (f:Face) :void {}
		
	}
}